<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<!-- 1.  .stop修饰符的使用 -->
			<div @click="divClick">
				aaaaaaaaaa
				<button type="button" @click.stop="btnClick">按钮</button>
			</div>
			<!-- 2. .prevent修饰符的使用 -->
			<br/>
			<form action="baidu" method="">
				<input type="submit" name="" id="" value="提交" @click.prevent="submitClick"/>
			</form>
			<br>
			<!-- 3. 监听某个键盘的键帽 -->
			<input type="text" name="" id="" value="" @keyup.enter="keyUp"/>
			<!-- 4. .once修饰符的使用 -->
			<button type="button" @click.once="btn2Click">按钮</button>
		</div>
		<script src="../js/vue.js"></script>
		<script>
			const app=new Vue({
				el:'#app',
				data:{
					message:'你好'
				},
				methods:{
					btnClick(){
						console.log('btnClick');
					},
					divClick(){
						console.log('divClick');
					},
					submitClick(){
						console.log('submitClick');
					},
					keyUp(){
						console.log('keyUp');
					},
					btn2Click(){
						console.log("btn2Click")
					}
				}
			})
		</script>
	</body>
</html>
